package com.liao.badminton.dto;

import com.liao.badminton.code.BaseField;
import com.liao.badminton.code.validation.Delete;
import com.liao.badminton.code.validation.Update;
import io.swagger.annotations.ApiModelProperty;
import com.liao.badminton.entity.ActivityParticipator;
import javax.validation.constraints.NotNull;
import java.util.List;
import lombok.Data;
import com.liao.badminton.code.validation.FindDetail;
import java.lang.String;
import java.math.BigDecimal;

/**
* @author liaocheng
* @date 2024-11-15
* description:活动参与者表
*/
@Data
public class ActivityParticipatorDto extends BaseField {

    @ApiModelProperty(value = "id")
    @NotNull(message = "主键id不能为空",groups = {Update.class, FindDetail.class})
    private Long id;

    @ApiModelProperty(value = "id")
    private Long activityId;

    @ApiModelProperty(value = "用户和群id")
    private Long userGroupRefId;

    @ApiModelProperty(value = "活动文本内容")
    private String txtContent;
    @ApiModelProperty(value = "是否免费：0否，1是")
    private Integer FeeCharge;
    @ApiModelProperty(value = "是否半价：0否，1是")
    private Integer halfFlag;
    @ApiModelProperty(value = "是否飞机：0否，1是")
    private Integer onlySite;
    @ApiModelProperty(value = "费用")
    private BigDecimal cost;
    @ApiModelProperty(value = "排序")
    private Integer sortNum;

    @ApiModelProperty(value = "排序")
    private Integer orderByType;
    @ApiModelProperty(value = "排序")
    private Integer orderByTypeDesc;

    @NotNull(message = "主键id不能为空",groups = {Delete.class})
    private List<Long> delIds;  //批量删除ids

    public ActivityParticipator invertEntity(){
        ActivityParticipator dto = new ActivityParticipator();
        BaseField.invert(this, dto);
        dto.setId(this.getId());
        dto.setActivityId(this.getActivityId());
        dto.setUserGroupRefId(this.getUserGroupRefId());
        dto.setTxtContent(this.getTxtContent());
        dto.setFeeCharge(this.getFeeCharge());
        dto.setHalfFlag(this.getHalfFlag());
        dto.setOnlySite(this.getOnlySite());
        dto.setCost(this.getCost());
        return dto;
    }
}
